import java.util.Scanner;

public class test4 {
//对于以下这些数（6 行，每行 6 个，共 36 个），请问约数个数最多的是哪个？
//（如果有多个，请回答出现最早的那个）
//393353 901440 123481 850930 423154 240461
//373746 232926 396677 486579 744860 468782
//941389 777714 992588 343292 385198 876426
//483857 241899 544851 647930 772403 109929
//882745 372491 877710 340000 659788 658675
//296521 491295 609764 718967 842000 670302

    public static void main(String[] args) {
        //输入
        Scanner scan  = new Scanner(System.in);
//        String str = scan.nextLine();
        String str ="393353 901440 123481 850930 423154 240461 " +
                    "373746 232926 396677 486579 744860 468782 " +
                    "941389 777714 992588 343292 385198 876426 " +
                    "483857 241899 544851 647930 772403 109929 " +
                    "882745 372491 877710 340000 659788 658675 " +
                    "296521 491295 609764 718967 842000 670302";

        String[] arr = str.split(" ");
        int[] count = new  int[36];
        for (int i = 0; i < arr.length; i++) {
            count[i] = getyueshu(Integer.parseInt(arr[i]));
        }
        int index = -1;
        int max = 0;
        for (int i = 0; i < count.length; i++) {
            if(count[i]>max){
                max = count[i];
                index = i;
            }
        }
        System.out.println(arr[index]+"  "+max);
//        System.out.println("******");
//        System.out.println(getyueshu(6));
    }

    private static int getyueshu(int num) {
        int count = 0;
        for (int i = 1; i <= num; i++) {
            if (num % i == 0) {
//                System.out.println(i);
                count++;
            }
        }
        return count;
    }
}
